package cn.tedu.test.config;


import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Component;

//@Component
public class UserDetailsServiceImpl{ // implements UserDetailsService

//    @Autowired
//    PasswordEncoder passwordEncoder;
//
//    @Override
//    public UserDetails loadUserByUsername(String username)
//            throws UsernameNotFoundException {
//        if (username.equals("Jerry")) {
//            String pwd = passwordEncoder.encode("123456");
//            System.out.println(pwd);
//            UserDetails userDetails =
//                    User.builder().username("Jerry")
//                    .password(pwd)
//                    .roles("ADMIN").build();
//            return userDetails;
//        }
//        return null;
//    }
}
